package com.topvision.auth.dto;

import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * @author shengwm
 * @version V0.0.1
 * @Title: LoginDTO
 * @Package com.seed.security.web.rest.dto
 * @Description: 登录参数
 * @date 2017/6/16
 */
public class LoginDTO implements Serializable {

    private static final long serialVersionUID = -1769144316458939511L;

    @NotNull
    @Size(min = 1, max = 50)
    @ApiModelProperty(value = "登录账号")
    private String username;

    @NotNull
    @Size(min = 5, max = 16)
    @ApiModelProperty(value = "登录密码")
    private String password;

    @ApiModelProperty(value = "是否记住我")
    private Boolean rememberMe;

    public LoginDTO() {
    }

    public LoginDTO(String username, String password) {
        this.username = username;
        this.password = password;
    }

    public LoginDTO(String username, String password, Boolean rememberMe) {
        this.username = username;
        this.password = password;
        this.rememberMe = rememberMe;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Boolean getRememberMe() {
        return rememberMe;
    }

    public void setRememberMe(Boolean rememberMe) {
        this.rememberMe = rememberMe;
    }

    @Override
    public String toString() {
        return "LoginDTO{" +
                "username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", rememberMe=" + rememberMe +
                '}';
    }
}
